﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using SchoolLibrary.Entity.Person;

namespace SchoolLibrary.Desktop.Guide.Input
{
    public partial class PersonInputDialog : Form
    {
        public PersonInputDialog()
        {
            InitializeComponent();
        }

        private void cancelButton_Click(object sender, EventArgs e)
        {
            this.Close();
        }

        protected virtual void build(Person person)
        {
            person.Surname = this.surnameBox.Text;
            person.Name = this.nameBox.Text;
            person.MiddleName = this.middleNameBox.Text;
        }

        protected void setPerson(Person person)
        {
            this.surnameBox.Text =  person.Surname;
            this.nameBox.Text = person.Name;
            this.middleNameBox.Text = person.MiddleName;
        }

        protected virtual void okButton_Click(object sender, EventArgs e)
        {

        }
    }
}
